package cn.edu.cimv.service.impl;

import cn.edu.cimv.dao.entity.Latest;
import cn.edu.cimv.dao.mapper.LatestMapper;
import cn.edu.cimv.service.LatestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 门铎 on 2016/6/27.
 */
@Service
public class LatestServiceImpl implements LatestService {
    @Autowired private LatestMapper latestMapper;
    @Override
    public void editLatest(Latest latest) {
        latestMapper.insertLatest(latest);
    }

    @Override
    public List<Latest> queryLatest() {
        return latestMapper.queryLatest();
    }

    @Override
    public void deleteLatest(int id) {
        latestMapper.deleteLatest(id);
    }

    @Override
    public Latest queryLatestById(int id) {
        return latestMapper.queryLatestById(id);
    }

    @Override
    public void updateLatest(Latest latest) {
        latestMapper.updateLatest(latest);
    }
}
